package com.ming.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *@Author:何元才
 *@Desc:
 *@data:2021-04-27 15:23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "book_rent")
public class BookRent implements Serializable {
    /**
     * 借阅id
     */
    @TableId(value = "rent_id", type = IdType.AUTO)
    private Integer rentId;

    /**
     * 被借书的id
     */
    @TableField(value = "book_id")
    private Integer bookId;

    @TableField(value = "book_name")
    private String bookName;

    /**
     * 借阅人
     */
    @TableField(value = "rent_name")
    private String rentName;

    /**
     * 借阅人手机号
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 借阅开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "begin_time")
    private String beginTime;

    /**
     * 节约结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "end_time")
    private String endTime;

    /**
     * 借阅状态  0 未归还     1 已归还   
     */
    @TableField(value = "state")
    private Integer state;

    /**
     * 操作者id
     */
    @TableField(value = "handler_id")
    private Integer handlerId;

//    @TableField(exist = false)
//    private String handler;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "update_time")
    private Date updateTime;

}